/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.buzzwords.factories;

import com.buzzwords.emails.Email;
import com.buzzwords.emails.ForgotPasswordEmail;
import com.buzzwords.emails.SignUpEmail;
import com.buzzwords.domain.User;

/**
 *
 * @author devinpartlow
 */
public class EmailFactory {

    private User user;

    public EmailFactory(User user) {
        this.user = user;
    }
    
    public String getEmail(String type) {
        if(type.equals("Sign Up")) {
            Email email = new SignUpEmail(user);
            return email.getEmail();
        } if (type.equals("Forgot Password")) {
            Email email = new ForgotPasswordEmail(user);
            return email.getEmail();
        }
        return "";
    }

    User getUser() {
        return user;
    }

    void setUser(User user) {
        this.user = user;
    }

}
